package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.AddPuzzleEvent;

public class AddPuzzleStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public AddPuzzleStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.ADD_PUZZLE);		
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		AddPuzzleEvent fullEvent = (AddPuzzleEvent) event;
		physModel.addPuzzle(fullEvent.puzzle);		
	}

}
